Calculating hydrogen bonds: the basics¶
We will find the hydrogen bonds in a box of water in order to demonstrate the basic usage of HydrogenBondAnaysis.
Last updated: February 3, 2021 with MDAnalysis 2.0.0-dev
Minimum version of MDAnalysis: 2.0.0-dev0
Packages required:
MDAnalysisTests
See also
Note
Please cite Smith et al. (2018) when using HydrogenBondAnaysis in published work.
[1]:
import pickle
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import MDAnalysis as mda
from MDAnalysis.tests.datafiles import waterPSF, waterDCD
from MDAnalysis.analysis.hydrogenbonds import HydrogenBondAnalysis
# the next line is necessary to display plots in Jupyter
%matplotlib inline
Loading files¶
We will load a small water-only systems containing 5 water molecules and 10 frames then find the hydrogen bonds present at each frame.
[2]:
u = mda.Universe(waterPSF, waterDCD)
Warning
It is highly recommended that a topology with bond information is used (e.g. PSF, TPR, PRMTOP), as this is the only way to guarantee the correct identification of donor-hydrogen pairs.
Hydrogen bonds¶
In molecular dynamics simulations, hydrogen bonds are typically identified via the following geometric criteria:
the donor-acceptor distance (\(r_{DA}\)) must be less than a specified cutoff, typically 3 Å
the donor-hydrogen-acceptor angle (\(\theta_{DHA}\)) must be greater than a specified cutoff, typically 150°